Python api tutorial for beginners